package eu

type Caller interface {
	Error() error
	Call(f func() error)
}

type callerImpl struct {
	error error
}

func WithErrCaller() Caller {
	return &callerImpl{}
}

func (c *callerImpl) Error() error {
	return c.error
}

func (c *callerImpl) Call(f func() error) {
	if c.error != nil {
		return
	}

	f()
}
